Description:
Instead of invocation of the same getter method multiple times, it is more efficient to call it once and store the returned value in a local variable.
Incorrect:
var str:String;
key1:String;
key2:String;
...
if str.Substring(index).Equals(key1) or str.Substring(index).Equals(key2) then
...
Correct:
var str:String;
key1:String;
key2:String;
s:String;
...
s:=str.Substring(index);
if s.Equals(key1) or s.Equals(key2) then
...